package cc.ailley.adapter.media;

import cc.ailley.adapter.MediaAdapter;
import cc.ailley.adapter.MediaPlayer;

public class AudioPlayer implements MediaPlayer {

    private MediaAdapter mediaAdapter;

    @Override
    public void play(String audioType, String fileName) {
        if("mp3".equals(audioType)){
            System.out.println("Playing mp3 file. Name: "+ fileName);
        } else if("vlc".equals(audioType) || "mp4".equals(audioType)){
            mediaAdapter = new MediaAdapter(audioType);
            mediaAdapter.play(audioType, fileName);
        } else{
            System.out.println("Invalid media. format not supported");
        }
    }
}
